#!/bin/bash

_max9296_addr_cti_jcb002=0x48
_max9296_addr_shenzhu=0x4a
_max9296_addr_rk=${_max9296_addr_shenzhu}

max9296_addr=${_max9296_addr_rk}
max9295_addr1=0x60
max9295_addr2=0x62

for i2c_bus in 30 31 32 33
do
	echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
	echo "I2C BUS = ${i2c_bus}"
	# echo "MAX9296 (${max9296_addr}): MFP0 0x2b0 - 0x2b2(shenzhu)"
	# i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xb0 r1
	# i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xb1 r1
	# i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xb2 r1
	echo "MAX9296 (${max9296_addr}): MFP7 0x2c5 - 0x2c7"
	i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xc5 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xc6 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9296_addr} 0x02 0xc7 r1
	echo "MAX9295 (${max9295_addr1}): MFP7 0x2d3 - 0x2d5"
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr1} 0x02 0xd3 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr1} 0x02 0xd4 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr1} 0x02 0xd5 r1
	echo "MAX9295 (${max9295_addr2}): MFP7 0x2d3 - 0x2d5"
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr2} 0x02 0xd3 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr2} 0x02 0xd4 r1
	i2ctransfer -y -f ${i2c_bus} w2@${max9295_addr2} 0x02 0xd5 r1
done
